
$(".adopt-btn").click(function() {
	var askid = $(this).attr('askid');
	var ansid = $(this).attr('ansid');
	var url = "?m=Index&c=Ans&a=accepts";
	$.ajax({
		url:url,
		type:"POST",
		data:{askid:askid,ansid:ansid},
		dataType:'JSON',
		success:function(data){
			if(data.state == 1){
				alert('采纳成功');
			}else{
				alert(data.msg);
			}
		}
	})

});